﻿using System;
using System.Collections.Generic;
using System.Text;
using DataLayer.SQL;
using System.Data.SqlClient;
using DataLayer.Queries;

namespace DataLayer.Manager
{
    public class UserCmdManager
    {
        CommandBuilder cmdBuilder;
        ParamBuilder paramBuilder;
        UserQueryBuilder queryBuilder;
        public UserCmdManager() {
            cmdBuilder = new CommandBuilder();
            paramBuilder = new ParamBuilder();
            queryBuilder = new UserQueryBuilder();
        }
        /// <summary>
        /// Obtiene un comando SQL a ejecutar para obtener todos los usuarios
        /// </summary>
        /// <returns>Comando que al ser ejecutado obtendrá todos los usuarios</returns>
        public SqlCommand GetAllUsersCommand() {
            SqlCommand command = cmdBuilder.GetTextCommand(queryBuilder.GetUsersList());
            return command;
        }
    }
}
